package com.spx.core.wizards;

import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchWizard;

import com.spx.core.CoreActivator;
import com.spx.core.services.ActivityLabel;
import com.spx.core.types.Activity;

/**
 */


@ActivityLabel(name="new-action-wizard")
public class NewActionWizard extends NewModelObjectWizard<Activity>
{

	private final ModelWizardPage<Activity> basic;

	/**
	 * Constructor for NewUserWizard.
	 */
	public NewActionWizard()
	{
		super();
		basic = new NewActionPage();
		pages.add(basic);
		setModelObject(new Activity());
		
	}

	/**
	 * We will accept the selection in the workbench to see if we can initialize
	 * from it.
	 * 
	 * @see IWorkbenchWizard#init(IWorkbench, IStructuredSelection)
	 */
	@Override
	public void init(IWorkbench workbench, IStructuredSelection selection)
	{

	}

	@Override
	public void finish()
	{
		CoreActivator.getDefault().getSecurityService().addAction(this.getModelObject());
	}
}